import {
  Button,
  ConfigProvider,
  Layout,
  Menu,
  message,
  Input,
  Space,
  Dropdown,
  Divider,
  Form,
  AutoComplete,
  Modal,
  Tree,
  Drawer,
  Row,
  Col,
  Select,
  DatePicker,
  Tooltip,
  Breadcrumb,
  Popconfirm,
  InputNumber,
  // Table,
  Pagination,
  Checkbox,
  Result,
  Avatar,
  Tag,
  Spin,
  Upload,
  Radio,
  TreeSelect,
  Tabs,
  Collapse,
  Cascader,
  Empty,
  Image,
  Timeline,
  Badge,
  Card,
  List,
  Switch,
  Popover
} from "ant-design-vue";
import { App } from "vue";

const antdCompList = [
  Button,
  ConfigProvider,
  Layout,
  Menu,
  Input,
  Space,
  Dropdown,
  Divider,
  Form,
  AutoComplete,
  Modal,
  Tree,
  Drawer,
  Row,
  Col,
  Select,
  DatePicker,
  Tooltip,
  Breadcrumb,
  Popconfirm,
  InputNumber,
  // Table,
  Pagination,
  Checkbox,
  Result,
  Avatar,
  Tag,
  Spin,
  Upload,
  Radio,
  TreeSelect,
  Tabs,
  Collapse,
  Cascader,
  Empty,
  Image,
  Timeline,
  Badge,
  Card,
  List,
  Switch,
  Popover
];

export default function useAntdDesign(app: App) {
  message.config({
    maxCount: 1
  });
  antdCompList.forEach(comp => {
    app.use(comp);
  });
}
